﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// 验证角色句柄
/// </summary>
public class AuthRoleHandler : PageHandlerFactory
{
    public override IHttpHandler GetHandler(HttpContext context, string requestType, string virtualPath, string path)
    {
        if (AuthRole.DirectoryValidate(context, virtualPath))
        {
            return new DefaultHttpHandler();
        }

        return base.GetHandler(context, requestType, virtualPath, path);
    }
}
